package com.vhall.component.entity.chat.vo;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * SendMessageReqVO-
 *
 * @author xing.wang
 * @date 2023/9/15
 */
@Data
public class SendMessageReqVO implements Serializable {
    /**
     * 发送消息的消息体
     * 示例:
     * body: {"type":"text","text_content":"123"}
     */
    @NotNull(message = "发送消息的消息体不能为空")
    private JSONObject body;
    /**
     * 发送消息的端
     * pc 端: pc_browser
     */
    @NotBlank(message = "发送消息的端不能为空")
    private String client;
    /**
     * 头像
     * 默认没有
     */
    private String avatar = "";
    /**
     * 回复消息
     * json 字符串:"replyMsg":{"type":"text",
     * "avatar":"",
     * "sendId":"14596","nickName":"尚记学","roleName":1,"content":{"text_content":[{"msgType":"text","msgCont":"2223"}],"type":"text"},
     * "showTime":"","sendTime":"2023-09-15T14:23:54","client":"","count":4,"replyMsg":{},"atList":[],
     * "roleNameText":{"text":"主持人","type":"host"},"isHistoryMsg":true,"msgId":"msg_05ad74a624115b4d78cfffd38c8bdf4f"}
     */
    private JSONObject replyMsg = new JSONObject();
    /**
     * at 一些人的字符串
     * "atList":[{"nickName":"2222","accountId":"15709","index":0}]
     */
    private JSONArray atList = new JSONArray();
    /**
     * 房间id
     * lss_fa95f6d6
     */
    @NotBlank(message = "房间id不能为空")
    @ParamName("room_id")
    @JsonProperty("room_id")
    private String roomId;
}
